<%@ include file="/common/taglibs.jsp"%>
<head>
    <title><fmt:message key="roleList.title"/></title>
    <script type="text/javascript" src="<c:url value='/ext/scripts/index/index.js'/>"></script>
</head>
<script type="text/javascript"
	src="<c:url value='/ext/scripts/display/displaypage.js'/>">
</script>
<script>
jQuery(function(){
		jQuery("#displayallpage").val(${displayallpage});
		jQuery("#tz").val(${thispage});
	});
function hiddenselectcon()
{
	var str = document.getElementById('selectcondiv');
	if(str.style.display=='none')
	{
		str.style.display='';
	}
	else
	{
		str.style.display='none';
	}
}

</script>
<div class="box_big">
<form method="post" action="${ctx}/user/roleform.html?method=query&operate=select" id="searchForm">

       <div class="tabbiao">
			<div class="r">
				<div class="con">
					<div style="float: left; width: 100%; margin: 0; padding: 0;" onclick="hiddenselectcon();">
						<h6>
							<fmt:message key="user.selectcon" />
						</h6>
					</div>
				</div>
			</div>
		</div>
	<div  ></div>
	<div class="tabcon" id="selectcondiv" style="display: none;">
		<table  border="0" cellspacing="0" cellpadding="0" class="table_surch">
			<tr height="18">
				<th width="10%">
					<fmt:message key="role.rolename"/>:
				</th>
				<td width="10%">
					<input type="text" size="20" name="rolename" id="query" value="${param.rolename}" />
				</td>
				<td width="30%">
						<input type="submit" value="" class="btn_search"/>
			    </td>
			</tr>
			
		</table>
		
	</div>
	<div class="adddi"><div class ="r"><div class="con">
	<table align="left" width="100%">
		<tr>
			<td align="left"><input type="button" onclick="location.href='<c:url value="/user/roleform.html?method=Add&from=list"/>'"  class="btn_add"/></td>
		</tr>
	</table>
	</div>
	</div>
	</div>
	
</form>
<form id="deleteform" method="post">
<input type="hidden" name="ptmeth" value="${ptmeth}"/>
<input type="hidden" name="tz" value="${thispage}"/>
</form>
<display:table name="roleList" cellspacing="0" cellpadding="0"
	requestURI="" id="roles" pagesize="${pagesize}" class="table_display" style="width:100%;" export="true" size="${resultSize}" partialList="true">
	<display:column property="roleid" titleKey="ID" escapeXml="true" sortable="true" style="border-left:1px solid #feb808;"/>
	<display:column property="rolename" escapeXml="true" sortable="true" titleKey="role.rolename" paramId="id" paramProperty="id" />
	<display:column property="createtime" titleKey="role.createtime" sortable="true" format="{0,date,yyyy-MM-dd HH:mm:ss}" maxLength="10"/>
	<display:column property="createuser" titleKey="role.creater" sortable="true"/>
	<display:column property="description" sortable="true" titleKey="role.description"
		 autolink="true" media="html" />
	<display:column titleKey="user.operate" style="width:13%; border-right:1px solid #feb808;" media="html">
	<a href="${ctx}/user/roleform.html?method=update&id=<c:out value="${roles.roleid}&tz=${thispage}&ptmeth=${ptmeth}"/>">
		<fmt:message key="button.update"/>
	</a>
	&nbsp;&nbsp;&nbsp;
	<a onclick="onDelete(<c:out value="${roles.roleid}"/>)">
		<fmt:message key="button.delete"/>
	</a>
	</display:column>
	<display:setProperty name="export.pdf" value="false" /> 
	<display:setProperty name="export.csv" value="false" /> 
	<display:setProperty name="export.xml" value="false" /> 
</display:table>
</div>
<script type="text/javascript">
    highlightTableRows("roles");
    function onDelete(id)
    {
    	var msg = "<fmt:message key="role.deletemsg"/>";
    	ans = confirm(msg);
    	if(ans) 
   		{
	    	var form = document.getElementById("deleteform");
	    	form.action = "${ctx}/user/roleform.html?delete=delete&roleid="+id;
	    	form.submit();
   		}
    }
</script>